<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<smart>include file ='../head.config.html'</smart>
<link href="../css/layout.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="..<smart>$templatepath</smart>/javascript/jquery.cookie.js"></script>
<script type="text/javascript">
	function addgray(){
		$('.select02').each(function(){
			if ($(this).find('li').length=='0'){$(this).css('background','#eee')}else{$(this).css('background','')}
		})
	};
	function tonext(whos) {
		$(whos).find('li').click(
			function(){			
				$(whos).find('li').removeClass('Selected');
				$(this).addClass('Selected');
				if ($(this).hasClass('IsFather')) {
					$(whos).next().html('<li>数据加载中...</li>');
					$.get('own_productcate.php',{action:'list',id:$(this).attr('id')},function(data){
						DataArray = data.split("|||");var a='';for (var i = 0; i<DataArray.length-1; i++) {att=DataArray[i].split("||");id=att[0];var cla="";if ('1'==att[2]) {cla="IsFather"};a+='<li id='+id+' class='+cla+'>'+att[1]+'</li>';};
						$(whos).next().html(a).css('background','').nextAll().html('').css('background','#eee');tonext('#'+$(whos).next().attr('id'));
						writeselected();
				})} else {$(whos).nextAll().html('').css('background','#eee');writeselected()};
		})
	};
	function writeselected(){
		a=$(".select02 li.Selected").map(function(){return $(this).html();}).get().join(" &gt; ") ;
		b=$(".select02 li.Selected").map(function(){return $(this).attr('id');}).get().join("|") ;
		$('#NowSelectedResult').html(a);
		$.cookie('saveselect', b);
		c=$(".select02 li.Selected:last").attr('id');
		$("#select_cate_id").val(c);
		$("#select_all_id").val(b);
	}
	$().ready(function() {
		addgray();tonext('#select_first');
		

	});
</script>
</head><body>
<div id="container760"> <smart>include file ='../header.html'</smart> <smart>include file ='../PathLinksLevel.html'</smart>
  <DIV id="PostMethods">
    <DIV id="Top_bg"></DIV>
    <DIV id="PutMerchandise"><A href="#" id="Buynow" onclick="$('#Selltype').val('1');$(this).addClass('selected').next().removeClass('selected')">
      <DIV class="PostCardStyle2">
        <DIV class="Icon"><IMG alt="icon" src="http://pics.taobao.com/bao/album/sys/auction/sell_icon_buynow01.gif" /></DIV>
        <DIV class="Paragraph">
          <P class="G">设定固定价格<BR />
            让买家可以立刻购买。</P>
        </DIV>
        <DIV class="Button">一口价发布</DIV>
      </DIV>
      </A><A href="#" id="Group" onclick="$('#Selltype').val('2');$(this).addClass('selected').prev().removeClass('selected')">
      <DIV class="PostCardStyle2">
        <DIV class="Icon"><IMG alt="icon" src="http://pics.taobao.com/bao/album/sys/auction/sell_icon_group01.gif" /></DIV>
        <DIV class="Paragraph">
          <P class="G">设定最少数量和团购价格<BR />
            让买家支付预订金后团体购买。</P>
        </DIV>
        <DIV class="Button">团购发布</DIV>
      </DIV>
      </A> </DIV>
    <DIV id="Bottom_bg"></DIV>
  </DIV>
  <div id='aa'>
    <ul id="select_first" class="select02">
      <smart> section name=i loop=$top_cate </smart>
      <LI class="<smart> if $top_cate[i].haveson == 1 </smart>IsFather<smart> /if </smart>" id="<smart> $top_cate[i].id </smart>" ><smart> $top_cate[i].name </smart></LI>
      <smart> /section </smart>
    </ul>
    <ul id="select_second" class="select02">
    </ul>
    <ul id="select_third" class="select02">
    </ul>
    <ul id="select_fourth" class="select02">
    </ul>
  </div>
  <div class="HackBox"></div>
  <smart> if $pid eq '' </smart>
  	<form action="own_product.php?action=add" name="form1" method="post">
  <smart> else </smart>
  	<form action="own_product.php?action=modi&pid=<smart> $pid </smart>" name="form1" method="post">
  <smart> /if </smart>
    <DIV id="NowSelected">您当前选择的是：<SPAN id="NowSelectedResult"></SPAN>
      <input id="Selltype" name="Selltype" type="hidden" value="">
      <input id="select_cate_id" name="select_cate" type="hidden" value="">
      <input id="select_all_id" name="select_all" type="hidden" value="">
      <DIV id="BlebBox"><IMG src="http://pics.taobao.com/bao/album/sys/misc/publish_bleb.gif" /></DIV>
    </DIV>
    <div style="margin-top:10px; text-align:center">
      <input type="submit" name="submit" value="下一步">
    </div>
  </form>
  <smart>include file ='../footer.html'</smart></div>
</body>
</html>
